

package twitter;

import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;


public final class CreateFriendship {
   
    public  void follow(String args) {
       
        try {
            Twitter twitter = new TwitterFactory().getInstance();
            twitter.createFriendship(args);
            System.out.println("Successfully followed [" + args + "].");
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to follow: " + te.getMessage());
            System.exit(-1);
        }
    }
}
